<template>
  <span class="image" :style="style"></span>
</template>

<script>
export default {
  name: 'XImage',
  props: {
    src: {
      type: String,
      required: true
    }
  },
  computed: {
    style() {
      return {
        backgroundImage: `url(${this.src})`
      };
    }
  }
};
</script>
<style lang="scss" scoped>
  .image {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
  }
</style>
